package com.hzw.code.fast.sys.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hzw.code.fast.sys.controller.args.SysMenuArgs;
import com.hzw.code.fast.sys.controller.args.SysMenuPageArgs;
import com.hzw.code.fast.sys.controller.args.SysMenuQueryArgs;
import com.hzw.code.fast.sys.dto.SysMenuDto;
import com.hzw.code.fast.sys.dto.page.SysMenuPageDto;
import com.hzw.code.fast.sys.entity.SysMenuEntity;

import java.util.List;

/**
 * 菜单（资源）表(SysMenu)业务层接口
 *
 * @author 胡汉三
 * @date 2020-05-20 14:24:34
 */
public interface SysMenuService extends IService<SysMenuEntity> {
    /**
     * 保存
     *
     * @param args ${@link SysMenuArgs}
     * @throws RuntimeException ${@link RuntimeException}
     * @author code generation
     * @date 2020-05-20 14:24:34
     */
    void save(SysMenuArgs args) throws RuntimeException;


    /**
     * 通过id更新
     *
     * @param args ${@link SysMenuArgs}
     * @throws RuntimeException ${@link RuntimeException}
     * @author code generation
     * @date 2020-05-20 14:24:34
     */
    void updateById(SysMenuArgs args) throws RuntimeException;


    /**
     * 分页查询
     *
     * @param args ${@link SysMenuPageArgs}
     * @throws RuntimeException ${@link RuntimeException}
     * @return IPage<SysMenuPageDto> ${@link IPage<SysMenuDto>}
     * @author code generation
     * @date 2020-05-20 14:24:34
     */
    IPage<SysMenuPageDto> page(SysMenuPageArgs args) throws RuntimeException;


    /**
     * 条件查询多条
     *
     * @param args ${@link SysMenuQueryArgs}
     * @throws RuntimeException ${@link RuntimeException}
     * @return List<SysMenuDto> ${@link List<SysMenuDto>}
     * @author code generation
     * @date 2020-05-20 14:24:34
     */
    List<SysMenuDto> selectListByModel(SysMenuQueryArgs args) throws RuntimeException;


    /**
     * 通过id查询详情
     *
     * @param id ${@link String}
     * @throws RuntimeException ${@link RuntimeException}
     * @return SysMenuDto ${@link SysMenuDto}
     * @author code generation
     * @date 2020-05-20 14:24:34
     */
    SysMenuDto getById(String id) throws RuntimeException;

    /**
     * 根据角色编号查询菜单权限
     * @param list
     * @return
     */
    List<String> getMenuByRoles(List<String> list);
}